<%@page import="java.sql.*" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>后台-删除|银光云-为银光字幕组提供最优质的云存储服务 - Powered by 金鸡独立</title>
<%
	String user=null;
	Cookie[] cookie=request.getCookies();
	if(cookie!=null){
		for(int i=0;i<cookie.length;i++){
			if(cookie[i].getName().equals("SilverCouldUserName")==true){
				user=cookie[i].getValue();
			}
		}
	}
	if((user=="")||(user==null)){
		out.println("您还没有登陆，请进入登陆页面登陆：<br/>");
		out.println("<a href=\"index.jsp\">重新登陆</a>");
		return ;
	}
%>
<%
	int id=Integer.parseInt(request.getParameter("id"));
	boolean b=false;
	Class.forName("com.mysql.jdbc.Driver");
	Connection con=DriverManager.getConnection((String) application.getAttribute("dburl"),(String) application.getAttribute("username"),(String) application.getAttribute("password"));
	Statement s=con.createStatement();
	String sqls="DELETE FROM data WHERE id="+id;
	if(s.executeUpdate(sqls)==1) b=true;
%>
</head>
<body>
<center>
<h1><font color="red">银光字幕组专属云服务后台管理系统-删除</font></h1>
当前账户：<%=session.getAttribute("username") %>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="logout.jsp">安全注销</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="main.jsp">返回主页</a><br/>
删除信息：id=<%=id %>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
删除成功？
&nbsp;&nbsp;&nbsp;
<%=b %>
<br/>
<a href="main.jsp">返回主页</a>
</center>
</body>
</html>